package com.zyg.springboot_web;

import com.baomidou.mybatisplus.test.autoconfigure.MybatisPlusTest;
import com.zyg.dao.RoleMapper;
import com.zyg.pojo.Role;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase;

@MybatisPlusTest
@AutoConfigureTestDatabase(replace = AutoConfigureTestDatabase.Replace.NONE)
class MybatisPlusSampleTest {

    @Autowired
    private RoleMapper roleMapper;

    @Test
    void testInsert() {
        Role role = Role.builder().roleName("测试角色").build();
        roleMapper.insert(role);
    }
}